package chap04.r21421.d1106.exec;



public class Test {
    public static void main(String[] args) {
    Square square=new Square();
        System.out.println(square.getArea(10));
        System.out.println(square.getLength(10));
    }
}
    abstract  class Shape{

    public abstract double getArea(double x);

    public abstract double getLength(double y);
}
    class Square extends Shape{
    @Override
    public  double getArea(double x){
        return x*x;
    }
    @Override
    public  double getLength(double y){
        return 4*y;
    }
}
    class Circle extends Shape{
    @Override
    public  double getArea(double x){
        return Math.PI*x*x;
    }
    @Override
    public  double getLength(double y){
        return 2*Math.PI*y;
    }

}
